-
Notifications
You must be signed in to change notification settings - Fork 79
Correct the index.js to be required for example/ #1203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes incorrect relative import paths in example files to properly reference the main index.js file. The changes update require statements to use the correct number of directory traversals based on each file's location within the example folder structure.
- Updates require paths from
../index.jsto appropriate relative paths (../../index.jsor../../../index.js) - Corrects rosidl parser imports to use proper relative paths
- Removes unused imports and fixes a syntax error in one file
Reviewed Changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| example/topics/validator/validator-example.js | Updates rclnodejs import path from ../index.js to ../../../index.js |
| example/topics/subscriber/*.js | Updates rclnodejs import paths to use correct relative path ../../../index.js |
| example/topics/publisher/*.js | Updates rclnodejs import paths to use correct relative path ../../../index.js |
| example/timer/timer-example.js | Updates rclnodejs import path to ../../index.js |
| example/services/*/*.js | Updates rclnodejs import paths to use correct relative path ../../../index.js |
| example/rosidl/*.js | Updates parser import paths and fixes syntax error in action example |
| example/rate/rate-example.js | Updates rclnodejs import path to ../../index.js |
| example/parameter/*.js | Updates rclnodejs import paths to use correct relative path ../../index.js |
| example/lifecycle/lifecycle-node-example.js | Updates rclnodejs import path to ../../index.js |
| example/graph/ros-graph-example.js | Updates rclnodejs import path to ../../index.js |
| example/actions/*/*.js | Updates rclnodejs import paths and removes unused imports |
|
|
||
| const parser = require('../rosidl_parser/rosidl_parser.js'); | ||
|
|
||
| s; |
Copilot
AI
Jul 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line contains invalid syntax 's;' which should be removed or replaced with the correct parser import statement.
This PR fixes incorrect relative import paths in example files to properly reference the main index.js file. The changes update require statements to use the correct number of directory traversals based on each file's location within the example folder structure. - Updates require paths from `../index.js` to appropriate relative paths (`../../index.js` or `../../../index.js`) - Corrects rosidl parser imports to use proper relative paths - Removes unused imports and fixes a syntax error in one file Fix: #1202
This PR fixes incorrect relative import paths in example files to properly reference the main index.js file. The changes update require statements to use the correct number of directory traversals based on each file's location within the example folder structure.
../index.jsto appropriate relative paths (../../index.jsor../../../index.js)Fix: #1202